﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Usr.Repository.Entities
{
    /// <summary>
    /// 用户提现记录表
    /// </summary>
    [Table("usr_WithdrawalsRecord"), Comment("用户提现记录表"), Index(nameof(UserId),nameof(ApplyDate))]
    public class WithdrawalsRecord : EfEntity
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Comment("用户ID")]
        public long UserId { get; set; }

        /// <summary>
        /// 金额
        /// </summary>
        [Comment("提现金额"), Column(TypeName = "decimal(18,2)")]
        public decimal Amount { get; set; }

        /// <summary>
        /// 本金
        /// </summary>
        [Comment("提现没有手续费的金额"), Column(TypeName = "decimal(18,2)")]
        public decimal NoChargeBalance { get; set; }

        /// <summary>
        /// 提现有手续费的
        /// </summary>
        [Comment("提现有手续费的金额"), Column(TypeName = "decimal(18,2)")]
        public decimal ChargeBalance { get; set; }


        /// <summary>
        /// 提现费用
        /// </summary>
        [Comment("提现费用"), Column(TypeName = "decimal(18,2)")]
        public decimal Fee { get; set; }

        /// <summary>
        /// 实际到账金额
        /// </summary>
        [Comment("实际到账金额"), Column(TypeName = "decimal(18,2)")]
        public decimal ActualAmount { get; set; }

        /// <summary>
        /// 银行卡记录ID
        /// </summary>
        [Comment("银行卡记录ID")]
        public long BankCardId { get; set; }

        /// <summary>
        /// 银行卡信息的镜像
        /// </summary>
        [Comment("银行卡信息的镜像")]
        public string BankCardImage { get; set; }

        /// <summary>
        /// 状态 -1:驳回; 0:处理中; 1:成功
        /// </summary>
        [Comment("状态。-1:驳回; 0:处理中; 1:成功")]
        public int State { get; set; }

        /// <summary>
        /// 申请日期
        /// </summary>
        [Comment("申请日期")]
        public DateTime ApplyDate { get;set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Comment("创建时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        [Comment("审核人")]
        public long? Reviewer { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        [Comment("审核时间")]
        public DateTime? AuditTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Comment("备注"),MaxLength(2000)]
        public string? Remark { get; set; }
    }
}
